import request from '@/utils/request'

// 查询门诊结账记录主列表 (分页)
export function selectPageOutpAcctMaster(query) {
    return request({
        url: '/business/outpAcctMaster/selectPage',
        method: 'get',
        params: query
    })
}

// 查询门诊结账记录主列表 (不分页)
export function listOutpAcctMaster(query) {
    return request({
        url: '/business/outpAcctMaster/list',
        method: 'get',
        params: query
    })
}

// 查询门诊结账记录主详细
export function getOutpAcctMaster(outpAcctMasterId) {
    return request({
        url: '/business/outpAcctMaster/' + outpAcctMasterId,
        method: 'get'
    })
}

// 新增门诊结账记录主
export function addOutpAcctMaster(data) {
    return request({
        url: '/business/outpAcctMaster',
        method: 'post',
        data: data
    })
}

// 修改门诊结账记录主
export function updateOutpAcctMaster(data) {
    return request({
        url: '/business/outpAcctMaster',
        method: 'put',
        data: data
    })
}

// 删除门诊结账记录主
export function delOutpAcctMaster(outpAcctMasterId) {
    return request({
        url: '/business/outpAcctMaster/' + outpAcctMasterId,
        method: 'delete'
    })
}

// 门诊结账确认
export function confirmTheAccount(query) {
    return request({
        url: "/business/outpAcctMaster/confirmTheAccount",
        method: "get",
        params: query,
    });
}

// 获取最后一次结账结束时间
export function getLastAcctEndDate(query) {
    return request({
        url: "/business/outpAcctMaster/getLastAcctEndDate",
        method: "get",
        params: query,
    });
}


// 获取结账支付金额明细和会计科目
export function getAcctDetailAndMoney(query) {
    return request({
        url: "/business/outpAcctMaster/getAcctDetailAndMoney",
        method: "get",
        params: query,
    });
}
